Any message received that is syntactically valid but either with a keyword that is unknown to the server or has incorrect arguments should be met with a response as if it was an action message with a ``failure'' response (i.e., respond with the same keyword, transaction ID but only a ``FALSE'' argument). This allows both the server and client to fail gracefully while still sending a response that semantically makes sense. There is one issue with this in that the client will not be aware that they have sent a malformed message as it may just seem as if their request had failed – however this could be corrected be simply adding an action message that notifies the sender of the particular error.

Messages that are not syntactically correct (i.e., garbage or some other form of corrupted data) should be responded to by closing the connection. While this is not as graceful as the previous way of handling errors, it means that the server will not become over-encumbered as it tries to process potentially large amounts of random data.


In order for the server to detect if a client is still connected, it will try to send a ``heartbeat'' action message – specifically ``\textit{SA\_PING}'' – every sixty seconds. Upon receiving this message, the client should respond with a ``success'' response, after which the server will wait for another sixty seconds before sending another heartbeat. If there is no response to this heartbeat after sixty seconds, the server will assume that that the client has disconnected and must log that user out.
